home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19980901-19981211 / 000173_news@newsmaster….columbia.edu _Wed Oct 21 11:12:06 1998.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA26219
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Wed, 21 Oct 1998 11:12:06 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA09464
  7.     for kermit.misc@watsun; Wed, 21 Oct 1998 11:12:05 -0400 (EDT)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.sys.hp.hpux,comp.protocols.kermit.misc
  11. Subject: Re: Emulating VT100 PF1-PF3 with Kermit
  12. Date: 21 Oct 1998 15:12:01 GMT
  13. Organization: Columbia University
  14. Lines: 112
  15. Message-ID: <70ktk1$9q3$1@apakabar.cc.columbia.edu>
  16. References: <70ih6b$1k7@hacgate2.hac.com> <70iscv$c8m$1@apakabar.cc.columbia.edu> <70j8j2$ldj$3@news.rz.uni-karlsruhe.de>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.sys.hp.hpux:93227 comp.protocols.kermit.misc:9369
  19.  
  20. In article <70j8j2$ldj$3@news.rz.uni-karlsruhe.de>,
  21. Heribert Dahms <DAHMS@ifk20.mach.uni-karlsruhe.de> wrote:
  22. : In <70iscv$c8m$1@apakabar.cc.columbia.edu> fdc@watsun.cc.columbia.edu writes:
  23. : : In article <70ih6b$1k7@hacgate2.hac.com>,
  24. : : KEITH OUTWATER /5G3110 <vac4050@PROBLEM_WITH_INEWS_GATEWAY_FILE> wrote:
  25. : : : On my "real" VT100 terminal, PF1-PF3 are above the 7,8,9,-
  26. : : : on the numeric keypad.  My HPUX keyboard doesn't have these
  27. : : : keys and F1-F3 on the HP keyboard (C3757) doesn't work
  28. : : : with Kermit.
  29. : : : 
  30. : : Right, Kermit can't do that because Kermit can't see the keys on
  31. : : your keyboard.  It can only see the characters that HP-UX generates
  32. : : for them, one at a time.
  33. : : 
  34. : : The way to get F-keys and other special keys to work as they do on
  35. : : a VT100 or other kind of terminal is to map them that way outside of
  36. : : Kermit, e.g. if you are using an xterm, use xmodmap.  The precise
  37. : : method depends on your window manager, the kind of xterm you are
  38. : : running (if any), and what kind of keyboard you have.
  39. : I usually just type the sequence for PF1 myself: <ESC>OP
  40. : PF2: <ESC>OQ PF3: <ESC>OR PF4: <ESC>OS
  41. Technically speaking, the problem is that C-Kermit, which runs on literally
  42. hundreds of different UNIX (and non-UNIX) platforms, has only the lowly
  43. "read(0,&c,1)" call available to read the keyboard.  This works very well in
  44. the sense that it doesn't matter whether you are using the workstation's
  45. own keyboard in the text console or in an X or HP-VUE window, or if you are
  46. coming in over a serial port, or on a Telnet, Rlogin, X.25, or other kind of
  47. network connection.  The drawback, of course, is that reading characters
  48. from stdin does not give you access to the system- and keyboard-dependent
  49. scan codes to let us know that you typed some special key.  Any method of
  50. accessing the keyboard at a lower level would be (a) necessarily nonportable,
  51. and (b) nonfunctional if you were not actually using the workstation keyboard.
  52. And to complicate the situation, I am not aware of any API available to a user
  53. program to tell whether "stdin" is the real keyboard and screen (console or
  54. xterm running on the console) or is associated with a communications
  55. connection (serial or network).
  56.  
  57. A further, and more subtle, drawback is that even if you have used Xmodmap
  58. or other method to map the appropriate escape sequences to F keys (or
  59. whatever), C-Kermit still reads characters and not keystrokes, and therefore
  60. has no way of knowing whether (say) <ESC> O P was produced by pressing one
  61. key or three, and therefore whether to group them in a single write to avoid
  62. spacings between them that could throw off user programs like VI that are
  63. sensitive to such things.
  64.  
  65. : Hi Frank, since you seem to listen:
  66. :
  67. Sure I do.  C-Kermit is fully supported on HP-UX by contract between HP
  68. and the Kermit Project, and the Kermit Project takes its obligations
  69. seriously.
  70.  
  71. : Hpterms and VTs of K95 under NT work quite fine, except one
  72. : annoying thing: The page up and down keys scroll locally,
  73. : which the original terminal emulators don't do!
  74. : Typing <ESC>[5~ and <ESC>[6~ is too much finger acrobatic on a
  75. : German keyboard, even for me 8-)
  76. : How do I configure K95 to send page up and down to host, when
  77. : pressed without any modifier key?
  78. The PC keyboard is not the same as the (native) HP keyboard, and so there
  79. must be a mapping.  So that every user will not have to figure out how to
  80. accomplish this individually, we provide a default mapping for each terminal
  81. type in Kermit 95.  The bad thing about defaults is that they rarely please
  82. everybody.  The good thing is that they can be changed.
  83.  
  84. The method for changing a terminal-specific key definition in K95 is:
  85.  
  86.  1. Find out the keycode of the desired key.  Use the "show key" command
  87.     to do this:
  88.  
  89.       K-95> show key
  90.       Press key: <press-desired-key-here>
  91.       Key code \4385 Gray-PageUp (default) => Verb: \Kupscn
  92.       K-95>
  93.  
  94.     Now you know the keycode and the current definition.
  95.  
  96.  2. Use the "set terminal key" command to install the new definition:
  97.  
  98.       K-95> set term key hpterm \4385 \27[5~
  99.  
  100.     This means: when my terminal emulation is HPTERM, I want the Page Up
  101.     key to send <ESC>[5~.
  102.  
  103.  3. Put the desired "set term key" in your K95CUSTOM.INI file.
  104.  
  105. : The booklet only mentions Ctrl-Gray-Page-Up (and -Down), but what
  106. : is Gray on a German keyboard, please?
  107. :
  108. The current version of K95 is 1.1.17.  It includes a vastly expanded user
  109. manual, which you can read with your Web browser.  You can patch up from
  110. whatever version you have to 1.1.17 at:
  111.  
  112.   http://www.columbia.edu/kermit/k95patch.html
  113.  
  114. : There's only left+right Strg (Ctrl), Alt and AltGr!
  115. :
  116. The USA keyboard has a gray (color) editing keypad below the Print Screen,
  117. Scroll Lock, and Pause keys, and a gray arrow (cursor) keypad below the
  118. editing keypad.  The numeric keypad also has keys labeled the same way;
  119. these labels apply when Num Lock is not on.
  120.  
  121. In any case, you can assign any desired functions to any desired keys --
  122. whatever you want.
  123.  
  124. Note that K-95 is different from C-Kermit in this respect, since K-95
  125. really *does* have access to the physical keyboard via well-defined Windows
  126. (or OS/2) APIs.
  127.  
  128. - Frank